.theme-toggle-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
}

.theme-toggle-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.theme-toggle-btn:hover::before {
  width: 100px;
  height: 100px;
}

.theme-toggle-btn:hover {
  transform: scale(1.1) rotate(180deg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

/* 图标动画 */
.theme-toggle-btn .anticon {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.theme-toggle-btn:hover .anticon {
  transform: scale(1.2) rotate(360deg);
}

/* 浅色主题样式 */
[data-theme="light"] .theme-toggle-btn {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  color: #1890ff;
  border: 2px solid #e8f4fd;
  box-shadow: 0 2px 12px rgba(24, 144, 255, 0.15);
}

[data-theme="light"] .theme-toggle-btn:hover {
  background: linear-gradient(135deg, #f0f8ff 0%, #e6f7ff 100%);
  border-color: #1890ff;
  box-shadow: 0 4px 20px rgba(24, 144, 255, 0.25);
}

[data-theme="light"] .theme-toggle-btn::before {
  background: radial-gradient(circle, rgba(24, 144, 255, 0.1) 0%, transparent 70%);
}

/* 深色主题样式 */
[data-theme="dark"] .theme-toggle-btn {
  background: linear-gradient(135deg, #1f1f1f 0%, #2d2d2d 100%);
  color: #ffd700;
  border: 2px solid #434343;
  box-shadow: 0 2px 12px rgba(255, 215, 0, 0.15);
}

[data-theme="dark"] .theme-toggle-btn:hover {
  background: linear-gradient(135deg, #2f2f2f 0%, #3d3d3d 100%);
  border-color: #ffd700;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.25);
}

[data-theme="dark"] .theme-toggle-btn::before {
  background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
}

/* 主题切换动画 */
.theme-toggle-btn.theme-transitioning {
  animation: themePulse 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

@keyframes themePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

/* 环形扩散动画 */
.theme-toggle-btn .ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .theme-toggle-btn {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
  }
  
  .theme-toggle-btn:hover::before {
    width: 80px;
    height: 80px;
  }
}

/* 无障碍支持 */
.theme-toggle-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.3);
}

.theme-toggle-btn:focus-visible {
  outline: 2px solid #1890ff;
  outline-offset: 2px;
}

/* 高性能动画优化 */
.theme-toggle-btn {
  will-change: transform, box-shadow;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.theme-toggle-btn .anticon {
  will-change: transform;
  backface-visibility: hidden;
}

/* 禁用状态 */
.theme-toggle-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.theme-toggle-btn:disabled:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-toggle-btn:disabled .anticon {
  transform: none;
} 